<template>
  <div style="height: 100%">
    <vxe-table
      border
      show-overflow
      ref="xTable2"
      max-height="100%"
      :data="data.data" v-show="!data.columnShow">
      <vxe-table-column field="stateName" title="省分" width="80" align="center" fixed="left"></vxe-table-column>
      <vxe-table-column field="cityName" title="地市" width="80" align="center" fixed="left"></vxe-table-column>
      <vxe-table-colgroup field="group2" :title="data.showDate" align="center">
        <vxe-table-column field="classRank" title="上年综合规模全国排名" width="180" align="center"></vxe-table-column>
        <vxe-table-column field="zhgmRank" title="实时综合规模全国排名" width="180" align="center"></vxe-table-column>
        <vxe-table-column field="category" title="上年分类" width="80" align="center"></vxe-table-column>
        <vxe-table-column field="ssfl" title="实时分类" width="80" align="center"></vxe-table-column>
        <vxe-table-column field="srzcScore" title="收入增长率得分" width="140" align="right" header-align="center"></vxe-table-column>

        <vxe-table-column field="zcbcScore" title="资产报酬率改善得分" width="160" align="right" header-align="center"></vxe-table-column>
        <vxe-table-column field="ysqkScore" title="营收款欠款比率扣分" width="160" align="right" header-align="center"></vxe-table-column>
        <vxe-table-column field="dddfScore" title="代垫电费欠款比率扣分" width="170" align="right" header-align="center"></vxe-table-column>
        <vxe-table-column field="ebitdaScore" title="EBITDA率扣分" width="120" align="right" header-align="center"></vxe-table-column>
        <vxe-table-column field="totScore" title="总分" width="80" align="right" header-align="center"></vxe-table-column>
        <vxe-table-column field="srzcRatio" title="收入增长率(%)" width="120" align="right" header-align="center"></vxe-table-column>

        <vxe-table-column field="zcbcRatio" title="资产报酬率(%)" width="120" align="right" header-align="center"></vxe-table-column>
        <vxe-table-column field="ysqkRatio" title="营收款欠款比率(%)" width="160" align="right" header-align="center"></vxe-table-column>
        <vxe-table-column field="dddfRatio" title="代垫电费欠款比率(%)" width="170" align="right" header-align="center"></vxe-table-column>
        <vxe-table-column field="ebitdaRatio" title="EBITDA率(%)" width="120" align="right" header-align="center"></vxe-table-column>
        <vxe-table-column field="ebitda" title="EBITDA" width="160" align="right" header-align="center"></vxe-table-column>
      </vxe-table-colgroup>
    </vxe-table>
    <vxe-table
      border
      show-overflow
      ref="xTable2"
      max-height="100%"
      :data="data.data" v-show="data.columnShow">
      <vxe-table-column field="stateName" title="省分" width="80" align="center" fixed="left"></vxe-table-column>
      <vxe-table-column field="cityName" title="地市" width="80" align="center" fixed="left"></vxe-table-column>
      <vxe-table-colgroup field="group2" :title="data.showDate" align="center">
        <vxe-table-column field="classRank" title="上年综合规模全国排名" width="180" align="center"></vxe-table-column>
        <vxe-table-column field="zhgmRank" title="实时综合规模全国排名" width="180" align="center"></vxe-table-column>
        <vxe-table-column field="category" title="上年分类" width="80" align="center"></vxe-table-column>
        <vxe-table-column field="ssfl" title="实时分类" width="80" align="center"></vxe-table-column>
        <vxe-table-column field="srzcScore" title="收入增长率得分" width="140" align="right" header-align="center"></vxe-table-column>
        <vxe-table-column field="tzzsScore" title="投资增收比得分" width="140" align="right" header-align="center"></vxe-table-column>
        <vxe-table-column field="zcbcScore" title="资产报酬率改善得分" width="160" align="right" header-align="center"></vxe-table-column>
        <vxe-table-column field="ysqkScore" title="营收款欠款比率扣分" width="160" align="right" header-align="center"></vxe-table-column>
        <vxe-table-column field="dddfScore" title="代垫电费欠款比率扣分" width="170" align="right" header-align="center"></vxe-table-column>
        <vxe-table-column field="ebitdaScore" title="EBITDA率扣分" width="120" align="right" header-align="center"></vxe-table-column>
        <vxe-table-column field="totScore" title="总分" width="80" align="right" header-align="center"></vxe-table-column>
        <vxe-table-column field="srzcRatio" title="收入增长率(%)" width="120" align="right" header-align="center"></vxe-table-column>
        <vxe-table-column field="tzzsRatio" title="投资增收比(%)" width="120" align="right" header-align="center"></vxe-table-column>
        <vxe-table-column field="zcbcRatio" title="资产报酬率(%)" width="120" align="right" header-align="center"></vxe-table-column>
        <vxe-table-column field="ysqkRatio" title="营收款欠款比率(%)" width="160" align="right" header-align="center"></vxe-table-column>
        <vxe-table-column field="dddfRatio" title="代垫电费欠款比率(%)" width="170" align="right" header-align="center"></vxe-table-column>
        <vxe-table-column field="ebitdaRatio" title="EBITDA率(%)" width="120" align="right" header-align="center"></vxe-table-column>
        <vxe-table-column field="ebitda" title="EBITDA" width="160" align="right" header-align="center"></vxe-table-column>
      </vxe-table-colgroup>
    </vxe-table>
  </div>
</template>

<script>
  import 'xe-utils'
  import 'vxe-table/lib/index.css'
	export default {
    name: 'CityTable',
    props: ['data'],
	  data() {
      return {
        showDate: '',
        page1: {
          currentPage: 1,
          pageSize: 10,
          totalResult: 200
        },
      }
    },
    created() {
      this.handleData()
    },
    watch: {
      'data.data': function(val) {
        this.handleData()
      },
      deep: true
    },
    methods: {
      handleData(){
      }
    },
  }
</script>

<style lang="scss" scoped>
  .table-main {
    overflow: scroll;
    width: 95%;
    margin: 10px;
    padding: 10px 0;
  }

</style>
